#pragma once
#include "base/function.h"
#include "util/noncopyable.h"
#include "base/config.h"

namespace net_tools
{
  namespace util
  {
    class Count_down_cond;
  }
  class Eventloop;

  namespace base
  {
    class Thread;
  } // namespace base
  class Eventloopthread : util::noncopyable
  {
  public:
    Eventloopthread(eventloop_func func, int size = _C::CHANNEL_DEFAULT_SIZE, std::string thread_name = "DEFAULT NAME");
    ~Eventloopthread(){};
    net_tools::Eventloop *Get_eventloop_() const;

  private:
    void Default_func();
    int eventloop_size;
    eventloop_func func_thread_in;
    func default_func_;
    base::Thread *thread_;
    net_tools::Eventloop *eventloop_;
  };

} // namespace net_tools